<template>
  <span class="menu-link" @click="isDialogVisible = true">
    <ElBadge :value="size || ''" :max="99">
      <i class="header-btn-icon el-icon-cpu"></i>
    </ElBadge>
    <ElementDialog :visible.sync="isDialogVisible" title="日志" show-full-screen height="600px;" width="80%">
      <ErrLogs />
    </ElementDialog>
  </span>
</template>

<script>
  import { mapGetters } from 'vuex'
  import ErrLogs from './ErrLogs'

  export default {
    name: 'TopLogs',
    components: { ErrLogs },
    data() {
      return {
        isDialogVisible: false
      }
    },
    computed: {
      ...mapGetters('logs', ['size'])
    }
  }
</script>
